#include "stdafx.h"
#include "EnemyManager.h"

//using namespace std;

CEnemyManager::CEnemyManager()
{

}

CEnemyManager::~CEnemyManager()
{

}

void CEnemyManager::Render()
{
	//printf("Rendering...EnemyManager");
	for (unsigned int i = 0; i < m_Enemies.size(); ++i)
	{
		m_Enemies[i]->Render();
	}
}

void CEnemyManager::Update()
{
	for (unsigned int i = 0; i < m_Enemies.size(); ++i)
	{
		m_Enemies[i]->Update();
	}
	//printf("Updating...EnemyManager");

}

void CEnemyManager::AddEnemy(EEnemyType EnemyType, float x, float y, float z)
{
	CEnemy* l_Enemy=NULL;

	switch(EnemyType)
	{
	case BOSS:
			l_Enemy=new CBossEnemy();
		break;
	case PATROL:
			l_Enemy=new CPatrolEnemy();
		break;
	case BASIC:
			l_Enemy=new CBasicEnemy();
		break;
	}
	
	l_Enemy->setX(x);
	l_Enemy->setY(y);
	l_Enemy->setZ(z);


	if(l_Enemy!=NULL) m_Enemies.push_back(l_Enemy);

}

